<!DOCTYPE html PUBLIC "-//W3C//XHTML 1.0 Transitional" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title>POL Scripting Reference UNICODE.EM</title>
		<meta name="keyword" content="POL, EScript, documentation, Ultima Online, UO, packets, client, ultima online client, emulator" />
		<meta name="description" content="Penultima Online Documentation website." />
		<meta name="Author" content="Racalac, Rykard" />
		<meta name="Generator" content="POL Doc-o-matic" />
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<link href="style.css" rel="stylesheet" type="text/css"  media="all"  />
	</head>
	<script language="JavaScript1.2" type="text/javascript">
function ExpandContract(s) {
  var bulletE = document.getElementById("bullet_"+s);
  var spanE = document.getElementById("span_"+s);
  var Expanded = bulletE.innerHTML;

  if(Expanded == '[+]') {
    spanE.style.display = 'block';
    bulletE.innerHTML = '[-]';
  }
  else { 
    spanE.style.display = 'none'; 
    bulletE.innerHTML = '[+]';
  }
}
</script>

<body>
<div class="container"><div id="doc-mini-header">
<div class="doc-home"><a href="index.html">
              Home
  				  </a></div>
<h1>
<a name="TOP"></a>
						File:
						Unicode.em</h1>
<p>
						Description:
						Functions that allow messages to be sent to clients in any unicode language UO supports.<br><b>
							Last Modified:
							02/10/2009</b></p>
</div></div><div class="container"><div class="doc-mainbox">
<div class="expander"><a href="javascript:ExpandContract('Constants')" id="bullet_Constants">[-]</a></div>
<center><h2>File Constants:</h2></center>
<span id="span_Constants"><pre>const _DEFAULT_UCFONT  := 3;<br>const _DEFAULT_UCCOLOR := 0x3B2;<br>// Constants for PrintTextAbove*<br>const JOURNAL_UC_PRINT_NAME    := 0x00; // Implicit.  Print's the object's description / npc's name in the journal.<br>const JOURNAL_UC_PRINT_YOU_SEE := 0x01; // Will print "You see:" in the journal.</pre></span>
</div></div><div id="main"><div class="container">
<div class="doc-col_2">
<div class="doc-smallbox">
<div class="expander"><a href="javascript:ExpandContract('Functions')" id="bullet_Functions">[-]</a></div>
<center><h2>Functions:</h2></center>
<span id="span_Functions"><ul>
<li><a href="#BroadcastUC">BroadcastUC</a></li>
<li><a href="#PrintTextAbovePrivateUC">PrintTextAbovePrivateUC</a></li>
<li><a href="#PrintTextAboveUC">PrintTextAboveUC</a></li>
<li><a href="#RequestInputUC">RequestInputUC</a></li>
<li><a href="#SendSysMessageUC">SendSysMessageUC</a></li>
</ul></span>
</div>
<div class="doc-smallbox-gold">
<div class="expander"><a href="javascript:ExpandContract('Modules')" id="bullet_Modules">[-]</a></div>
<center><h2>Modules:</h2></center>
<span id="span_Modules"><ul>
<li><a href="attributesem.html">
                      Attributes
          				  </a></li>
<li><a href="basicem.html">
                      Basic
          				  </a></li>
<li><a href="boatem.html">
                      Boat
          				  </a></li>
<li><a href="cfgfileem.html">
                      CfgFile
          				  </a></li>
<li><a href="clilocem.html">
                      CliLoc
          				  </a></li>
<li><a href="datafileem.html">
                      DataFile
          				  </a></li>
<li><a href="fileem.html">
                      File
          				  </a></li>
<li><a href="guildsem.html">
                      Guild
          				  </a></li>
<li><a href="httpem.html">
                      Http
          				  </a></li>
<li><a href="mathem.html">
                      Math
          				  </a></li>
<li><a href="npcem.html">
                      Npc
          				  </a></li>
<li><a href="osem.html">
                      OS
          				  </a></li>
<li><a href="partyem.html">
                      Party
          				  </a></li>
<li><a href="polsysem.html">
                      PolSys
          				  </a></li>
<li><a href="storageem.html">
                      Storage
          				  </a></li>
<li><a href="unicodeem.html">
                      Unicode
          				  </a></li>
<li><a href="uoem.html">
                      UO
          				  </a></li>
<li><a href="utilem.html">
                      Util
          				  </a></li>
<li><a href="vitalsem.html">
                      Vitals
          				  </a></li>
</ul></span>
</div>
</div>
<div class="doc-col_23">
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="BroadcastUC">BroadcastUC(uc_text, langcode, font:=_DEFAULT_UCFONT, color:=_DEFAULT_UCCOLOR)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>uc_text</var></td>
<td>Array of 2-byte integers, where each integer is a Unicode character</td>
</tr>
<tr>
<td width="50%"><var>langcode</var></td>
<td>3-character 'Originating Language' string code  e.g. ENU, CHT, DEU, RUS, KOR, etc.</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional) font code. Not the same as non-unicode font codes</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer (optional) color code. Not the same color as the same value for non-unicode prints</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Broadcasts a unicode string to all players</td></tr>
<tr><td colspan="2">uc_text MUST be an array of integers representing unicode characters.</td></tr>
<tr><td colspan="2">Integers must be "Big Endian" (0x1234) and not "Little Endian" (0x3412).</td></tr>
<tr><td colspan="2">Integers will be clipped internally to 2-bytes (value masked with 0xFFFF)</td></tr>
<tr><td colspan="2">The Array must be terminated with zero. (0x0000)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Unicode array exceeds maximum size." (200 characters)</td></tr>
<tr><td colspan="2">"langcode must be a 3-character code."</td></tr>
<tr><td colspan="2">"Invalid value in Unicode array."</td></tr>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PrintTextAbovePrivateUC">PrintTextAbovePrivateUC(above_object, uc_text, langcode, character, font:=_DEFAULT_UCFONT, color:=_DEFAULT_UCCOLOR, journal_print := JOURNAL_UC_PRINT_NAME)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>above_object</var></td>
<td>UObject reference</td>
</tr>
<tr>
<td width="50%"><var>uc_text</var></td>
<td>Array of 2-byte integers, where each integer is a Unicode character</td>
</tr>
<tr>
<td width="50%"><var>langcode</var></td>
<td>3-character 'Originating Language' string code  e.g. ENU, CHT, DEU, RUS, KOR, etc.</td>
</tr>
<tr>
<td width="50%"><var>character</var></td>
<td>Character reference to receive the text</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional) font code. Not the same as non-unicode font codes</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer (optional) color code. Not the same color as the same value for non-unicode prints</td>
</tr>
<tr>
<td width="50%"><var>journal_print</var></td>
<td>Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Displays a unicode string above 'above_object' only to 'character'</td></tr>
<tr><td colspan="2">uc_text MUST be an array of integers representing unicode characters.</td></tr>
<tr><td colspan="2">Integers must be "Big Endian" (0x1234) and not "Little Endian" (0x3412).</td></tr>
<tr><td colspan="2">Integers will be clipped internally to 2-bytes (value masked with 0xFFFF)</td></tr>
<tr><td colspan="2">The Array must be terminated with zero. (0x0000)</td></tr>
<tr><td colspan="2">Notes: journal_print flags:
</td></tr>
<tr><td colspan="2"><pre>
const JOURNAL_UC_PRINT_NAME	:= 0x00; // Implicit.  Print's the object's description / npc's name in the journal.
const JOURNAL_UC_PRINT_YOU_SEE := 0x01; // Will print "You see:" in the journal.</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success, 0 on failure</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Unicode array exceeds maximum size." (200 characters)</td></tr>
<tr><td colspan="2">"langcode must be a 3-character code."</td></tr>
<tr><td colspan="2">"Invalid value in Unicode array."</td></tr>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PrintTextAboveUC">PrintTextAboveUC(above_object, uc_text, langcode, font:=_DEFAULT_UCFONT, color:=_DEFAULT_UCCOLOR, journal_print := JOURNAL_UC_PRINT_NAME)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>above_object</var></td>
<td>UObject reference</td>
</tr>
<tr>
<td width="50%"><var>uc_text</var></td>
<td>Array of 2-byte integers, where each integer is a Unicode character</td>
</tr>
<tr>
<td width="50%"><var>langcode</var></td>
<td>3-character 'Originating Language' string code  e.g. ENU, CHT, DEU, RUS, KOR, etc.</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional) font code. Not the same as non-unicode font codes</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer (optional) color code. Not the same color as the same value for non-unicode prints</td>
</tr>
<tr>
<td width="50%"><var>journal_print</var></td>
<td>Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Displays a unicode string above 'above_object'</td></tr>
<tr><td colspan="2">uc_text MUST be an array of integers representing unicode characters.</td></tr>
<tr><td colspan="2">Integers must be "Big Endian" (0x1234) and not "Little Endian" (0x3412).</td></tr>
<tr><td colspan="2">Integers will be clipped internally to 2-bytes (value masked with 0xFFFF)</td></tr>
<tr><td colspan="2">The Array must be terminated with zero. (0x0000)</td></tr>
<tr><td colspan="2">Notes: journal_print flags:
</td></tr>
<tr><td colspan="2"><pre>
const JOURNAL_UC_PRINT_NAME	:= 0x00; // Implicit.  Print's the object's description / npc's name in the journal.
const JOURNAL_UC_PRINT_YOU_SEE := 0x01; // Will print "You see:" in the journal.</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success, 0 on failure</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Unicode array exceeds maximum size." (200 characters)</td></tr>
<tr><td colspan="2">"langcode must be a 3-character code."</td></tr>
<tr><td colspan="2">"Invalid value in Unicode array."</td></tr>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="RequestInputUC">RequestInputUC(character, item, uc_prompt, langcode)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character reference to receive the text</td>
</tr>
<tr>
<td width="50%"><var>item</var></td>
<td>placeholder, pass any valid item</td>
</tr>
<tr>
<td width="50%"><var>uc_prompt</var></td>
<td>Array of 2-byte integers, where each integer is a Unicode character. The question to which the player types the response.</td>
</tr>
<tr>
<td width="50%"><var>langcode</var></td>
<td>3-character 'Originating Language' string code  e.g. ENU, CHT, DEU, RUS, KOR, etc.</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Displays a unicode system message prompt to 'character', the character can then enter unicode characters which will be returned to the script.</td></tr>
<tr><td colspan="2">uc_prompt MUST be an array of integers representing unicode characters.</td></tr>
<tr><td colspan="2">Integers must be "Big Endian" (0x1234) and not "Little Endian" (0x3412).</td></tr>
<tr><td colspan="2">Integers will be clipped internally to 2-bytes (value masked with 0xFFFF)</td></tr>
<tr><td colspan="2">The Array must be terminated with zero. (0x0000)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">a struct with members "lang" (3-character string), and "uc_text" (a "unicode array" of 2-byte integers representing unicode characters in the specified language) on success.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Another script has an active prompt"</td></tr>
<tr><td colspan="2">"Unicode array exceeds maximum size." (200 characters)</td></tr>
<tr><td colspan="2">"langcode must be a 3-character code."</td></tr>
<tr><td colspan="2">"Invalid value in Unicode array."</td></tr>
<tr><td colspan="2">"Invalid control characters in text entry"</td></tr>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendSysMessageUC">SendSysMessageUC(character, uc_text, langcode, font:=_DEFAULT_UCFONT, color:=_DEFAULT_UCCOLOR)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character reference to receive the text</td>
</tr>
<tr>
<td width="50%"><var>uc_text</var></td>
<td>Array of 2-byte integers, where each integer is a Unicode character</td>
</tr>
<tr>
<td width="50%"><var>langcode</var></td>
<td>3-character 'Originating Language' string code  e.g. ENU, CHT, DEU, RUS, KOR, etc.</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional) font code. Not the same as non-unicode font codes</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer (optional) color code. Not the same color as the same value for non-unicode prints</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Displays a unicode system message to 'character'</td></tr>
<tr><td colspan="2">uc_text MUST be an array of integers representing unicode characters.</td></tr>
<tr><td colspan="2">Integers must be "Big Endian" (0x1234) and not "Little Endian" (0x3412).</td></tr>
<tr><td colspan="2">Integers will be clipped internally to 2-bytes (value masked with 0xFFFF)</td></tr>
<tr><td colspan="2">The Array must be terminated with zero. (0x0000)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Unicode array exceeds maximum size." (200 characters)</td></tr>
<tr><td colspan="2">"langcode must be a 3-character code."</td></tr>
<tr><td colspan="2">"Invalid value in Unicode array."</td></tr>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr></tbody>
</table>
</div>
</div>
</div></div>
</div></div>
<div id="footer">
	<div class="container">
    <p >
      If you <i>know</i> if any information is incorrect on these pages, mail your corrections to polteam@polserver.com
    </p>
    <p >
      Copyright &copy;2003-2009 David Carpman and POL Development Team, all rights reserved. DO NOT REPRODUCE, MIRROR, ALTER, SPINDLE, MUTILATE, OR SIT ON.
    </p>
    </div>
    </div>
    </body>
    </html>
   